home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / bob_espo.swf / scripts / __Packages / PopUp.as < prev    next >
Text File  |  2013-04-24  |  1KB  |  66 lines

  1. class PopUp extends State
  2. {
  3.    static var sSTATE_IDLE = "Idle";
  4.    static var sSTATE_OPENING = "Opening";
  5.    static var sSTATE_OPENED = "Opened";
  6.    static var sSTATE_CLOSING = "Closing";
  7.    function PopUp(_mcRef)
  8.    {
  9.       super(_mcRef,false);
  10.       this.setState(PopUp.sSTATE_IDLE);
  11.    }
  12.    function doShow()
  13.    {
  14.       if(this.sState == PopUp.sSTATE_IDLE)
  15.       {
  16.          this.setState(PopUp.sSTATE_OPENING);
  17.       }
  18.    }
  19.    function doInstantShow()
  20.    {
  21.       if(this.sState == PopUp.sSTATE_IDLE)
  22.       {
  23.          this.setState(PopUp.sSTATE_OPENED);
  24.          this.initPopUp();
  25.       }
  26.    }
  27.    function doHide()
  28.    {
  29.       if(this.sState == PopUp.sSTATE_OPENED)
  30.       {
  31.          this.setState(PopUp.sSTATE_CLOSING);
  32.       }
  33.    }
  34.    function doInstantHide()
  35.    {
  36.       if(this.sState == PopUp.sSTATE_OPENED)
  37.       {
  38.          this.setState(PopUp.sSTATE_IDLE);
  39.       }
  40.    }
  41.    function initPopUp()
  42.    {
  43.    }
  44.    function Idle()
  45.    {
  46.    }
  47.    function Opening()
  48.    {
  49.       if(this.stateFinished())
  50.       {
  51.          this.setState(PopUp.sSTATE_OPENED);
  52.          this.initPopUp();
  53.       }
  54.    }
  55.    function Opened()
  56.    {
  57.    }
  58.    function Closing()
  59.    {
  60.       if(this.stateFinished())
  61.       {
  62.          this.setState(PopUp.sSTATE_IDLE);
  63.       }
  64.    }
  65. }
  66.